
// main_init function

main_init = function(mc){
 subs_done = true;
 hmh = (mc._height - $padding)/2;
 if (cursor_visibility > 0){
  createEmptyMovieClip("cursor",6);
  with(cursor){ 
   beginFill(cursor_color);
   moveTo (0,0);
   lineTo (cursor_width,0);
   lineTo (cursor_width,cursor_height);
   lineTo (0,cursor_height);
   endFill();
  }
  cursor.step = 0;
  cursor.onEnterFrame = function(){
   this.step++;
   if (this.step % cursor_blink_speed == 0) this._visible = !this._visible;
  }
 }
 cur_smc = 0;
 step = 0;
}

// main_effect function

main_effect = function(mc,frame){
 step++;
 var m = $smc[cur_smc];
 if (step == 1){
  m._alpha = 100;
  m._visible = true;
  delay = min_char_delay + (max_char_delay - min_char_delay) * Math.random();
  cursor._x = m._x+(m._width-$padding)*.5+2;
  cursor._y = ($vspacing ? $vspacing*Math.ceil((m._y-$padding/2-hmh)/$vspacing)+hmh : mc._y+hmh) - cursor_height;
 }
 if (step >= delay){
  cur_smc++;
  step = 0;
  if (cur_smc == $sub_cnt){
   if (cursor_visibility == 1) cursor.removeMovieClip();
   end_effect=true;
  }
 }
}

// sub_init function

sub_init = function(mc){
 mc._alpha = 0;
}

// sub_effect function

sub_effect = function(mc,frame){
}
